package com.software.demo1;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

public class BeanFactoryTest {
    public static void main(String[] args) {
        //有新的类包含了它所有的功能，不推荐使用
        BeanFactory factory = new XmlBeanFactory(new ClassPathResource("beans.xml"));
        Student student = factory.getBean("student", Student.class);
        student.study();
    }
}
